package com.hqyj.controller;


import com.hqyj.pojo.AttendanceSheet;
import com.hqyj.pojo.SalaryScale;
import com.hqyj.service.ISalaryScaleService;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author rock
 * @since 2021-10-20
 */
@RestController
@RequestMapping("/salary")
public class SalaryScaleController {

    @Resource
    ISalaryScaleService salaryScaleService;

    @RequestMapping("/salaryList")
    public HashMap<String,Object> listPage(Model model, SalaryScale salary){
        System.out.println("salary========"+salary);
        HashMap<String, Object> map = salaryScaleService.querySararyList(salary);
        return map;
    }
    @RequestMapping("/add")
    public HashMap<String,Object> insert(Model model, SalaryScale salary){
        System.out.println("+++"+salary);
        return salaryScaleService.insertSarary(salary);
    }
    @RequestMapping("/money")
    public HashMap<String,Object> money(Model model, SalaryScale salary){
        System.out.println("+++"+salary);
        HashMap<String, Object> map = salaryScaleService.moneySarary(salary);
        return map;
    }

}

